<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" import="java.util.List,com.dao.Message"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>留言板</title>
</head>
<body>
	<h1>留言板</h1>
	<%
		List<Message> list=(List<Message>)request.getAttribute("list");
		for(Message obj:list){
	%>
	<table width="600" border="1">
		<tr>
			<td>ID:</td>
			<td><%=obj.getId() %></td>
		</tr>
		<tr>
			<td>账号：</td>
			<td><%=obj.getMusername() %></td>
		</tr>
		<tr>
			<td>昵称：</td>
			<td><%=obj.getAuthor() %></td>
		</tr>
		<tr>
			<td>主题：</td>
			<td><%=obj.getTitle() %></td>
		</tr>
		<tr>
			<td>内容：</td>
			<td><%=obj.getContent() %></td>
		</tr>
		<tr>
			<td>日期：</td>
			<td><%=obj.getDate() %></td>
		</tr>
	</table>
	<%
		}
	%>
	<a href="<%=request.getContextPath() %>/users/login.jsp">退出</a>
	<p>${error}</p>
</body>
</html>